package cn.itsource.org.domain;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import cn.itsource.basic.domain.BaseDomain;
import lombok.Data;

import javax.validation.constraints.NotBlank;

/**
 * 
 * @TableName t_department
 */
@Data
public class TDepartment extends BaseDomain implements Serializable {


    /**
     * 部门编号
     */
    private String sn;

    /**
     * 部门名称
     */
    @NotBlank(message = "部门名称不能为空")
    private String name;

    /**
     * 部门的上级分类层级id
     */
    private String dirpath;

    /**
     * 部门状态 - 1启用，0禁用
     */
    private Integer state;

    /**
     * 部门管理员，关联Employee表id
     */
    private Long managerId;

    /**
     * 上级部门
     */
    private Long parentId;

    private List<TDepartment> children = new ArrayList<TDepartment>();

    private static final long serialVersionUID = 1L;
}